﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Web.Services;
using KPIS.GERP.GFMS.IBLL;
using KPIS.GERP.GFMS.BLL;
using KPIS.GERP.GFMS.MODEL;

namespace KPIS.GERP.GFMS.SERVICE
{
    /// <summary>
    /// Summary description for FIM_Petitions
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class FIM_Petitions : System.Web.Services.WebService
    {
        IBLL_FIM_Petitions bll = new B_FIM_Petitions();

        [WebMethod]
        public List<M_FIM_Petitions> GetFull(string bgm_source_seq, string bgm_year)
        {
            return (List<M_FIM_Petitions>)bll.GetFull(bgm_source_seq, bgm_year);
        }

        [WebMethod]
        public List<M_FIM_Petitions> GetList(string bgm_source_seq
            , string bgm_year, string work_area_seq, string event_seq
            , string contact_seq, string emp_seq, string filter)
        {
            return (List<M_FIM_Petitions>)bll.GetList(bgm_source_seq, bgm_year, filter);
        }

        [WebMethod]
        public List<M_FIM_Petitions> GetDirectPaymentList(string bgm_source_seq
            , string bgm_year, string petition_seq)
        {
            return (List<M_FIM_Petitions>)bll.GetDirectPaymentList(bgm_source_seq, bgm_year, petition_seq);
        }

        [WebMethod]
        public List<M_FIM_Petitions> GetApprovedList(string bgm_source_seq, string bgm_year, string filter)
        {
            return (List<M_FIM_Petitions>)bll.GetApprovedList(bgm_source_seq, bgm_year, filter);
        }

        //[WebMethod]
        //public string SelectRecentInsertedRoleSeq()
        //{
        //    return bll.SelectRecentInsertedRoleSeq();
        //}

        [WebMethod]
        public M_FIM_Petitions GetInfo(string seq)
        {
            return bll.GetInfo(seq);
        }

        [WebMethod]
        public string Insert(M_FIM_Petitions info)
        {
            return bll.Insert(info);
        }

        [WebMethod]
        public void Update(M_FIM_Petitions info)
        {
            bll.Update(info);
        }

        [WebMethod]
        public void Delete(M_FIM_Petitions info)
        {
            bll.Delete(info);
        }

        [WebMethod]
        public void UpdateGlTranSeq(M_FIM_Petitions info)
        {
            bll.UpdateGlTranSeq(info);
        }

        [WebMethod]
        public void UpdatePetitionNo(M_FIM_Petitions info)
        {
            bll.UpdatePetitionNo(info);
        }

        [WebMethod]
        public void ChangeStatus(M_FIM_Petitions info)
        {
            bll.ChangeStatus(info);
        }

        private void InitializeComponent()
        {

        }
    }
}
